<?php
	$root = "http://".$_SERVER['HTTP_HOST']."/".substr($_SERVER['PHP_SELF'], 1, strpos(substr($_SERVER['PHP_SELF'], 1), "/"))."/";
?>
<html lang="en">
  <head>
    <title>打印模板</title>
    <base href="<?php echo $root;?>">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <link rel="stylesheet" href="lib/print-preview/css/print-preview.css" type="text/css" media="screen">
    <script src="js/jquery.tools.min.js"></script>
    <script src="lib/print-preview/jquery.print-preview.js" type="text/javascript" charset="utf-8"></script>
    <style>
		@media print{
			div{display:none}
			.bgnoprint{background:display:none;}
			.noprint{display:none}
		}
	</style>
  </head>  
  <body >
    <div>
      <a class="print-preview">打印预览</a>
    </div>
    <center>
     <h2  class="noprint11">伊奇煤矿2012-11-21日KJ报警日报表</h2>
    <table id="idTable" cellpadding="2" cellspacing="0" border="1" width="95%">
      <tr>
      	<td align="center">序号</td>
      	<td align="center">煤矿名称</td>
      	<td align="center">传感器编号</td>
      	<td align="center">安装位置</td>
      	<td align="center">传感器类别</td>
      	<td align="center">报警最大值</td>
      	<td align="center">报警时长</td>
      	<td align="center">报警结束时间</td>
      </tr>

      <tr>
      	<td align="center">1</td>
      	<td align="center">mineName</td>
      	<td align="center">sensorNo</td>
      	<td align="center">installationLocation</td>
      	<td align="center">sensorCategory</td>
      	<td align="center">bigValues</td>
      	<td align="center">alarmTime</td>
      	<td align="center">endTime</td>
      </tr>
    </table>
   	<br>
    </center>
    <script type="text/javascript">
        $(function() {            
            //Initialise print preview plugin
            $('a.print-preview').printPreview();
            // Add keybinding (not recommended for production use)
            $(document).bind('keydown', function(e) {
                var code = (e.keyCode ? e.keyCode : e.which);
                if (code == 80 && !$('#print-modal').length) {
                    $.printPreview.loadPrintPreview();
                    return false;
                }            
            });
        });
    </script>
  </body>
</html>
